package com.ceshiren.test.houduankaifa.util;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.commons.codec.Resources;

import java.io.InputStream;

public class DataBaseConnectionUtil {



    public static SqlSession getSqlSession() {
        InputStream inputStream = Resources.getInputStream("SqlMapConfig.xml");
        SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
        SqlSession session = sessionFactory.openSession();
        return session;
    }


}
